<!-- 教学管理-班级学生-机构人员列表 -->
<template>
  <div class="JNPF-common-layout">
    <div class="JNPF-common-layout-center">
      <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent>
          <el-col :span="6">

            <el-form-item label="机构名称">
              <el-select v-model="listQuery.fcustomno" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options3"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="人员名称">
              <el-input v-model="listQuery.fcatname" placeholder="请输入编号或名称" clearable />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="">
              <el-button type="primary" icon="el-icon-search" @click="getlist">查询</el-button>
              <!-- <el-button type="success" icon="el-icon-plus" @click="insert(undefined)">新增</el-button> -->
              <el-button type="warning" icon="el-icon-upload2">导出</el-button>
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>
      <div class="JNPF-common-layout-main JNPF-flex-main">
        <JNPF-table :data="list" border v-loading="loading">
          <el-table-column prop="FPARENT" label="机构名称" ></el-table-column>
          <el-table-column prop="FCATNO" label="编号" width="100"></el-table-column>
          <el-table-column prop="FCATNAME" label="姓名" width="100"></el-table-column>
          <el-table-column prop="FPOINT" label="职务" width="80"></el-table-column>
          <el-table-column prop="FWORK" label="职位" ></el-table-column>
          <el-table-column prop="TEL" label="电话" width="80"></el-table-column>
          <el-table-column prop="FEMAIL" label="电子邮箱" width="150"></el-table-column>
          <el-table-column prop="FMEMO" label="备注">
          </el-table-column>
          <el-table-column fixed="left" label="操作" width="100">
            <template slot-scope="scope">
              <el-button @click.native.prevent="insert(scope.row.FCATNO)" icon="el-icon-edit" type="text" size="small">
                浏览
              </el-button>
              <!-- <el-popconfirm title="确定删除当前数据吗？" @confirm="Catdelete(scope.row.FCATNO)">
                <el-button slot="reference" icon="el-icon-delete" style="color: red;margin-left: 10px;"
                  type="text">删除</el-button>
              </el-popconfirm> -->
            </template>
          </el-table-column>
        </JNPF-table>
        <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" />
        <Form ref="Form" :parelist="list" />
      </div>
    </div>
  </div>
</template>

<script>
  import Form from "./Form.vue"
  export default {
    name: 'shop',
    components: { Form },
    data() {
      return {
        fvisiblelist: [
          { id: "1", fullName: "是" },
          { id: "2", fullName: "否" },
        ],
        options3: [{
          value: '20E01',
          label: '上海研学教育中心'
        }, {
          value: '20E02',
          label: '上海科技研学基地'
        }, {
          value: '20N01',
          label: '上海文化之旅研学机构'
        }, {
          value: '20N02',
          label: '蓝湖营地教育冬令营'
        }],
        total: 0,
        list: [{   "FPARENT":"上海研学教育中心",
                    "FPOINT": "副总经理",
                    "FWORK":"市场部经理",
                    "FCATNO":"ZF103101",
                    "FCATNAME": "张飞",
                    "FTEL":"135****9087",
                    "FEMAIL":"135****9087@qq.com",
                    "FMEMO": "",
                    "FOPERATOR": "system",
                    "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
                  },
                  { "FPARENT":"上海研学教育中心",
                    "FPOINT": "总监",
                    "FWORK":"市场总监",
                    "FCATNO":"ZF103102",
                    "FCATNAME": "大乔",
                    "FTEL":"180****9087",
                    "FEMAIL":"180****9087@qq.com",
                    "FMEMO": "",
                    "FOPERATOR": "system",
                    "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
                  },
                  { "FPARENT":"上海研学教育中心",
                    "FPOINT": "财务",
                    "FWORK":"财务经理",
                    "FCATNO":"ZF103103",
                    "FCATNAME": "小乔",
                    "FTEL":"166****9087",
                    "FEMAIL":"166****9087@qq.com",
                    "FMEMO": "",
                    "FOPERATOR": "system",
                    "FUPDDATE": "2011-02-16T02:57:02.000+00:00"
                  }],
        loading: false,
        listQuery: {
          page: 1,
          limit: 20,
          sort: "desc",
          sidx: "",
          fcatno: "",
          fcatname: ""
        },
      };
    },
    computed: {},
    created() {
    },
    methods: {
      insert(row) {
        this.$refs.Form.init(row);
      },
    },
  };
</script>